package com.atguigu.gulimall.auth.vo;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

@Data
public class UserRegistVO {

    //JSR-303 校验注解
    @NotEmpty(message = "请输入用户名")
    @Length(min = 6,max = 18,message = "用户名长度为6~18位")
    private String userName;
    @NotEmpty(message = "请输入密码")
    @Length(min = 6,max = 18,message = "用户名长度为6~18位")
    private String password;
//    @Pattern(regexp = "^[1]([3-9])[0-9]$",message = "请输入正确的手机号码")
    private String phone;
    @NotEmpty(message = "请输入验证码")
    private String code;
}
